Menu Events Sample Script version 1.3 — an AWOL Software Production © 1994-6 Ross Brown
This script prompts for the name of an application, which can be any application that supports program linking (Apple events).
It lists all menus, finds the File menu, says which of its entries are enabled, then selects Option-Quit to quit the application.
This script requires version 1.3 (or later) of the Menu Events system extension and Menu Events Scripting Addition.